#!/usr/bin/env bash
base_url=$(pwd)
[[ -n $(docker ps -aqf ancestor=nginx:1.19.1) ]] && \
[[ -n $(docker rm -f nginx1.19.1) ]]
run_id=$(docker run \
       -d \
       --name nginx1.19.1 \
       --restart always \
       -v /data/docker/nginx/:/etc/nginx \
       -p 80:80 \
       -p 8080:8080 \
       nginx:1.19.1)
name=$(docker inspect -f "{{.Name}}" nginx1.19.1)
binds=$(docker inspect -f "{{.HostConfig.Binds}}" nginx1.19.1)
echo name: "${name:1}"
echo id: "${run_id:0:12}"
echo binds: "${binds}"
